package com.heima.fremarker.controller;

import com.heima.fremarker.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class HelloControll {

    @GetMapping("/basic")
    public String Hello(Model model){

        model.addAttribute("name","freemaker");
        Student student = new Student();
        student.setAge(18);
        student.setName("张三");

        Student student1 = student;
        student1.setAge(20);
        student1.setName("李四");
        model.addAttribute("stu",student);

        return "01-basic";
    }
}
